package com.zp.absfactory;

import com.zp.entity.*;

/**
 * @author zhpeng
 * @discription
 * @created 2021/9/3 13:45
 */
public class ColorFactory extends AbstractFactory{
    @Override
    public Color getColor(String color){
        if("".equals(color) || color == null){
            return null;
        }
        if("red".equals(color)){
            return new Red();
        }else if("blue".equals(color)){
            return new Blue();
        }else if("green".equals(color)){
            return new Green();
        }
        return null;
    }

    @Override
    public Geometry getGeometry(String geometry) {
        return null;
    }
}
